package com.jetinno.syrup2.upgrade


val UPGRADE_STEP_HANDSHAKE = "EE0700000023C5AD"
val UPGRADE_STEP_HANDSHAKE_RESPOND = "EE00010007C5AD"

/** 发给IO板的升级IO板指令 */
val UPGRADE_STEP_CHOOSE_IO = "EE00010023C5AD"
val UPGRADE_STEP_CHOOSE_IO_RESPOND = "EE00010024C5AD"

/** 升级成功的回复指令 */
val UPGRADE_STEP_SUCCESS = "EE00010005C5AD"


//YMODEM传输协议字符
val STR_SOH = "01"
val STR_STX = "02"
val STR_EOT = "04"
val STR_ACK = "06"
val STR_NAK = "15"
val STR_CAN = "18"
val STR_C = "43"

/** 固件升级最大重试次数 */
val UPGRADE_MAX_RETRY = 5
val BLOCK_SIZE_1024 = 1024

const val REASON_1: Int = 1//固件文件不存在
const val REASON_2: Int = 2//文件读取失败
const val REASON_3: Int = 3//第一次握手收到错误回复
const val REASON_4: Int = 4//发送升级指令后收到错误回复
const val REASON_5: Int = 5//文件为空
const val REASON_6: Int = 6//文件名过长
const val REASON_7: Int = 7//未知错误
const val REASON_8: Int = 8//文件读取出错
const val REASON_9: Int = 9//IO板无响应